<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>切换部门</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">

    <link rel="stylesheet" href="../assets/css/amazeui.min.css?v=2.9">
    <link rel="stylesheet" href="../assets/css/style.css?v=2.3">
    <link rel="stylesheet" href="../assets/css/index.css?v=2.3">
    <link rel="stylesheet" href="../assets/css/extend.css?v=2.3">
    <link rel="stylesheet" href="../assets/css/icons.css?v=2.3">
</head>
<body class="bg-gray">

<section class="" id="amz-main" data-tag="css-nav">

    <div id="depart" v-cloak class=" font-color-2 my-menu-lists bg-white am-margin-top-sm am-padding-left-sm" >
        <div  v-for="item in depart">
            <div class="box border-bottom" v-on:click="checked(item.id)">
                <div class="width-25px am-margin-right-sm ">
                    <i class="my-icon my-icon-pu01"></i>
                </div>
                <div class="box-1     ">
                    <span class="prelative">{{item.name}}</span>
                </div>
            </div>
        </div>
    </div>
</section>


<script src="../assets/js/jquery.min.js"></script>
<script src="../assets/js/amazeui.min.js"></script>
<script src="../assets/js/vue2.2.2.min.js"></script>
<script src="../assets/common.js"></script>
<link rel="stylesheet" href="../assets/js/layui/css/layui.css">
<script type='text/javascript' src='../assets/js/layui/layui.js'></script>
<script>
    $(".tab-container .tab-items").on("click", function () {
        $(".tab-container .tab-items").removeClass("cur");
        $(this).addClass("cur");
    })
</script>
<script>
    var sessionid = getQueryString("sessionid");
    var mask;
    layui.use('layer', function(){
        var layer = layui.layer;
    });
    $(function () {
        setTimeout(function(){
            mask = layer.msg('正在加载', {icon: 16});
            getdept();
            console.log(sessionid)
        },200)

    })
    function getdept() {
        $.ajax({
            url: baseUrl + 'v3.0/departList',
            type: 'get',
            contentType: 'application/json',
            headers: {'session_id': sessionid},
            success: function (result) {
                layer.close(mask);
                new Vue({
                    el: "#depart",
                    data: {
                        depart: result
                    },
                    methods: {
                        checked: function (id) {
                            window.location.href = "../bossRadar.html?departid="+id+"&sessionid="+sessionid;
                        }

                    }
                })

            }
        })
    }
</script>

</body>
</html>